<template>
	<view>
		<view class="title">
			{{detail.title}}
		</view>
		<view class="time">
			{{detail.time}}
		</view>
		<view style="margin-top: 20rpx;">
			<rich-text :nodes="detail.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				detail:{},
			}
		},
		onLoad(options) {
			this.id = options.id;
			this.getData()
		},
		methods: {
			getData(){
				let self = this;
				uni.showLoading({
					title: '加载中...'
				});
				self._get('news.pages/info', {
					id:self.id
				}, res => {
					self.detail = res.data;
					uni.hideLoading();
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.title{
		width: 686rpx;
		margin: 0 auto;
		font-size: 36rpx;
		color: #333333;
		font-weight: bold;
		margin-top: 20rpx;
	}
	.time{
		width: 686rpx;
		margin: 0 auto;
		font-size: 26rpx;
		color: #999999;
		margin-top: 20rpx;
	}

</style>
